package com.zmc.third.infrastructure.enums;

import lombok.Getter;

/**
 * @Author：zmc
 * @Date：2024/11/9 10:12
 */

@Getter
public enum PayEnum {

    //支付类型
    PAY_WAY_ALIPAY("1","支付宝支付"),
    PAY_WAY_WECHAT("2","微信支付"),

    //支付退款类型
    PAY_REFUND_WAY_ALIPAY("1","支付宝支付"),
    PAY_REFUND_WAY_WECHAT("2","微信支付"),

    //支付回调类型
    PAY_NOTIFY_WAY_ALIPAY("alipay","支付宝支付"),
    PAY_NOTIFY_WAY_WECHAT("wechat","微信支付"),

    //支付方式
    PAY_TYPE_ORDER_CODE("1","订单码支付"),
    PAY_TYPE_COMPUTER_WEBSITE("2","电脑网站支付"),


    //支付宝交易状态
    ALIPAY_NOT_EXIST("40004", "订单交易未创建"),
    ALIPAY_CREATE("10000","订单交易已创建"),
    ALIPAY_STATUS_NOT_EXIST("ACQ.TRADE_NOT_EXIST", "用户未扫码"),
    ALIPAY_STATUS_WAIT_BUYER_PAY("WAIT_BUYER_PAY", "订单交易已创建-用户已扫码，但是未支付"),
    ALIPAY_STATUS_TRADE_SUCCESS("TRADE_SUCCESS", "订单交易已创建-交易支付成功"),
    ALIPAY_STATUS_TRADE_FINISHED("TRADE_FINISHED", "订单交易已创建-交易结束，不可退款"),


    //支付查询返回状态码
    PAY_QUERY_RETURN_NOT_EXIST("1","用户未扫码"),
    PAY_QUERY_RETURN_NOT_PAY("2","用户已扫码，但未支付"),
    PAY_QUERY_RETURN_SUCCESS("3","用户已支付成功"),
    PAY_QUERY_RETURN_UNKNOWN("4","查询异常"),

    //支付结果
    PAY_INIT("0","支付中"),
    PAY_SUCCESS("1","支付成功"),
    PAY_FAIL("2","支付失败"),

    //退款结果
    REFUND_INIT("0","初始化"),
    REFUND_PROGRESS("1","退款中"),
    REFUND_SUCCESS("2","退款成功"),
    REFUND_FAIL("3","退款失败"),
    ;
    private final String code;

    private final String msg;

    PayEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
